class eco.VineManager extends MovieClip
{
    var createEmptyMovieClip, canvas, onEnterFrame, artery;
    function VineManager()
    {
        super();
        this.createEmptyMovieClip("canvas", 0);
        canvas.createEmptyMovieClip("veins", 0);
        canvas._x = xoff;
        canvas._y = yoff;
        this.createVein(eco.Vine.MAX_THICKNESS, 0, 0, random(6));
        onEnterFrame = doEnterFrame;
    } // End of the function
    function doEnterFrame()
    {
        ++count;
        var _loc4 = -(artery._x + artery.x);
        var _loc3 = -(artery._y + artery.y);
        xvel = xvel + (_loc4 - canvas.veins._x) / 500;
        yvel = yvel + (_loc3 - canvas.veins._y) / 500;
        xvel = xvel * 9.700000E-001;
        yvel = yvel * 9.700000E-001;
        var _loc2 = artery.angle * 180 / 3.141593E+000;
        _loc2 = _loc2 % 180 + 270;
        rvel = rvel + (_loc2 - canvas._rotation) / 2000;
        rvel = rvel * 9.600000E-001;
        canvas.veins._x = canvas.veins._x + xvel;
        canvas.veins._y = canvas.veins._y + yvel;
    } // End of the function
    function createVein(p_thickness, p_x, p_y, p_angle)
    {
        depth = ++depth % eco.VineManager.MAX_DEPTH;
        var _loc2 = canvas.veins.attachMovie("eco.Vine", "v" + depth, depth, {_x: p_x, _y: p_y, thickness: p_thickness, angle: p_angle, manager: this});
        if (p_thickness == eco.Vine.MAX_THICKNESS)
        {
            artery = _loc2;
        } // end if
    } // End of the function
    static var MAX_DEPTH = 2000;
    static var WIDTH = 585;
    static var HEIGHT = 155;
    var depth = 0;
    var xoff = eco.VineManager.WIDTH / 2;
    var yoff = eco.VineManager.HEIGHT / 2;
    var xvel = 0;
    var yvel = 0;
    var rvel = 0;
    var count = 0;
} // End of Class
